package com.zhi.syc.data;

import android.text.TextUtils;

import com.zhi.syc.data.logger.ASLogger;
import com.zhi.syc.data.util.ASUtil;

public class ASBuilder {
    public static final String KEY_SDK_VERSION = "11";
    public static String KEY_PRODUCT = "";
    public static String KEY_TOKEN = "";
    public static String KEY_APPID = "";
    public static String KEY_ANDROID = "";
    public static String KEY_ADVERT_ID = "";
    public static String KEY_ORDER_ID = "";
    public static String KEY_TZ = "";


    // TYPE_APPLIST
    public static final String T_APL = "T_APL";
    // TYPE_MESSAGE
    public static final String T_MAG = "T_MAG";
    // TYPE_DEVICE
    public static final String T_DIE = "T_DIE";
    // TYPE_BATTERY
    public static final String T_BTY = "T_BTY";
    // TYPE_HARDWARE
    public static final String T_HDW = "T_HDW";
    // TYPE_CONTACT
    public static final String T_COTACT = "T_COTACT";
    // TYPE_STORE
    public static final String T_STO = "T_STO";
    // TYPE_NETWORK
    public static final String T_NTW = "T_NTW";
    // TYPE_CALLOG
    public static final String T_CAL = "T_CAL";
    // T_D_RESULT
    public static final String T_D_RESULT = "T_D_RESULT";
    // P_APL
    public static String P_APL = "";
    // PATH_MESSAGE
    public static String P_MAG = "";
    // PATH_DEVICE
    public static String P_DIE = "";
    // PATH_BATTERY
    public static String P_BTY = "";
    // PATH_HARDWARE
    public static String P_HDW = "";
    // PATH_CONTACT
    public static String P_COTACT = "P_COTACT";
    // PATH_STORE
    public static String P_STO = "";
    // PATH_NETWORK
    public static String P_NTW = "";
    // PATH_CALLLOG
    public static String P_CAL = "";
    // P_D_RESULT
    public static String P_D_RESULT = "";

    // base url
    public static String S_HOST = "";

    // is mock
    public static boolean IS_MOCK = false;

    public static void setLog(boolean log) {
        ASLogger.Debug = log;
    }

    public static void setMock(boolean isMock) {
        IS_MOCK = isMock;
    }

    public static void setAppid(String appid) {
        KEY_APPID = ASUtil.safeString(appid);
    }

    public static void setServerHost(String serverHost) {
        if ((!TextUtils.isEmpty(serverHost)) && (serverHost.startsWith("http"))) {
            S_HOST = serverHost;
        } else {
            S_HOST = "";
        }
    }

    public static void setpApl(String applist) {
        P_APL = ASUtil.safeString(applist);
    }

    public static void setpMag(String message) {
        P_MAG = ASUtil.safeString(message);
    }

    public static void setpDie(String device) {
        P_DIE = ASUtil.safeString(device);
    }

    public static void setpBty(String battery) {
        P_BTY = ASUtil.safeString(battery);
    }

    public static void setpHdw(String hardware) {
        P_HDW = ASUtil.safeString(hardware);
    }

    public static void setpCotact(String contact) {
        P_COTACT = ASUtil.safeString(contact);
    }

    public static void setpSto(String store) {
        P_STO = ASUtil.safeString(store);
    }

    public static void setpNtw(String network) {
        P_NTW = ASUtil.safeString(network);
    }

    public static void setpCal(String calllog) {
        P_CAL = ASUtil.safeString(calllog);
    }

    public static void setpDResult(String dResult) {
        P_D_RESULT = ASUtil.safeString(dResult);
    }

    public static void setProduct(String keyProduct) {
        KEY_PRODUCT = ASUtil.safeString(keyProduct);
    }
}
